public class Test1 {
	public static void main(String[] args) {
		C c;
		c=new A();
		c.show();
		c=new B();
		c.show();

	}
}
class C{
	void show(){
		System.out.println("c");
	}
}
class B extends C{
	void show(){
		System.out.println("b");
	}

}
class A extends B{
	void show(){
		System.out.println("a");
	}

}